home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-07-15 | 3.3 KB | 100 lines | [TEXT/MPS ] |
- //----------------------------------------------------------------------------------------
- // UTwistDownControl.h
- // ETO20 MacApp 3.3.1, MPW 3.4.1
- // Copyright ©1994-1996 Conrad Kopala
- // Twist Down Lists version 2.0a0 7/15/96
- //----------------------------------------------------------------------------------------
-
- #ifndef __UTWISTDOWNCONTROL__
- #define __UTWISTDOWNCONTROL__
-
- #ifndef __UTWISTDOWNVIEW__
- #include "UTwistDownView.h"
- #endif
-
- //MacApp stuff
- #ifndef __UCONTROL__
- #include "UControl.h"
- #endif
-
- #ifndef __UCOMMAND__
- #include "UCommand.h"
- #endif
-
- //ToolBox stuff
- //None
-
- //ANSI stuff
- //None
-
- //----------------------------------------------------------------------------------------
- // Constants
- //----------------------------------------------------------------------------------------
- enum EHiliteState {
- noHilite = 0,
- blackHilite = 1,
- whiteHilite = 2
- };
- //----------------------------------------------------------------------------------------
- // Forward and external classes
- //----------------------------------------------------------------------------------------
- //none
- //----------------------------------------------------------------------------------------
- // TTwistDownControl
- //----------------------------------------------------------------------------------------
-
- class TTwistDownControl: public TControl
- {
- MA_DECLARE_CLASS;
-
- public:
- TTwistDownElement* fTwistDownElement;
- TTwistDownDocument* fTwistDownDocument;
- TTwistDownView* fTwistDownView;
- EHiliteState fHiliteState;
- EHiliteState fNewHiliteState;
-
- TTwistDownControl::TTwistDownControl();
- virtual ~TTwistDownControl();
-
- virtual void TTwistDownControl::ITwistDownControl(VPoint& itsLocation,
- TTwistDownElement* itsTwistDownElement,
- TTwistDownView* itsSuperView);
-
- TTwistDownElement* TTwistDownControl::GetTwistDownElement();
- void TTwistDownControl::UpdateControlLocationTo(short rowNumber);
- void TTwistDownControl::UpdateControlSizeTo();
- void TTwistDownControl::SetLocationTo(VPoint& itsLocation);
-
- virtual void TTwistDownControl::SuperViewChangedFrame(const VRect& oldFrame,
- const VRect& newFrame,Boolean invalidate);
-
- virtual void TTwistDownControl::Draw(const VRect& area);
- virtual void TTwistDownControl::DoMouseUp(VPoint& theMouse, TToolboxEvent* event, CPoint hysteresis);
- virtual void TTwistDownControl::DoEvent(EventNumber eventNumber, TEventHandler* source, TEvent* event);
-
- virtual void TTwistDownControl::Hilite();
- virtual void TTwistDownControl::HiliteState(Boolean state, Boolean redraw);
- virtual void TTwistDownControl::TrackMouse(TrackPhase aTrackPhase,
- VPoint& anchorPoint,VPoint& previousPoint,VPoint& nextPoint,
- Boolean mouseDidMove);
-
- void TTwistDownControl::FillTriangleBlack();
- void TTwistDownControl::FillTriangleGray();
- void TTwistDownControl::FillTriangleWhite();
-
- void TTwistDownControl::EraseControlArea();
-
- void TTwistDownControl::DrawClosedTriangle();
- void TTwistDownControl::DrawOpenTriangle();
- void TTwistDownControl::DrawIntermediateTriangle();
-
- };
-
- //----------------------------------------------------------------------------------------
- // Global initialization procedure
- //----------------------------------------------------------------------------------------
-
- extern void InitUTwistDownControl();
-
- #endif